{% extends "base.html" %} {%- block styles %} {{ super() }}
<link href="/static/css/common.css" rel="stylesheet" type="text/css" /> {% endblock styles -%} {% block title %}中传放心传-分享{% endblock %} {% block body %}

<div class="empty-line"></div>

<body class="share_body">
    <div>
        <form action="" method="post" class="share_form">
            {{ form.csrf_token }}
            <div class="file_display">
                <span class="label">{{ form.file_name.label }}</span>
                <br><br>
                <div style="text-align: center; font-size: 25px; color: #110000">{{ form.file_name.data }}</div>
            </div><br>
            <div class="form-check-inline">
                <span class="share_type">{{form.share_type.label }}</span> {% for option, label, checked in form.share_type.iter_choices() %}
                <input class="form-check-input" type="radio" name="{{ form.share_type.name }}" id="{{ form.share_type.id }}_{{ loop.index }}" value="{{ option }}" {% if checked %}checked{% endif %}>
                <label class="form-check-label" for="{{ form.share_type.id }}_{{ loop.index }}">{{ label }}</label> {% endfor %} {{ form.code_input }}
            </div><br>
            <div class="form-check-inline">
                <span class="share_type">{{ form.date_limit.label }}</span> {% for option, label, checked in form.date_limit.iter_choices() %}
                <input class="form-check-input" type="radio" name="{{ form.date_limit.name }}" id="{{ form.date_limit.id }}_{{ loop.index }}" value="{{ option }}" {% if checked %}checked{% endif %}>
                <label class="form-check-label" for="{{ form.date_limit.id }}_{{ loop.index }}">{{ label }}</label> {% endfor %} {{ form.date_select }}
            </div><br>
            <div class="form-check-inline">
                <span class="share_type">{{ form.counts_limit.label }}</span> {% for option, label, checked in form.counts_limit.iter_choices() %}
                <input class="form-check-input" type="radio" name="{{ form.counts_limit.name }}" id="{{ form.counts_limit.id }}_{{ loop.index }}" value="{{ option }}" {% if checked %}checked{% endif %}>
                <label class="form-check-label" for="{{ form.counts_limit.id }}_{{ loop.index }}">{{ label }}</label> {% endfor %} {{ form.counts_input }}
            </div><br><br>
            <div class="submit-btn">
                {{ form.submit }}
            </div><br> {% if error %}
            <div class="error">
                {{ error }}
            </div>
            {% endif %} {% if url %}
            <div class="url">
                文件分享链接：
                <a href="/shared_file/{{ url }}">/shared_file/{{ url }}</a>
            </div>
            {% endif %}
        </form>
    </div>
</body>
{% endblock %}